<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@page import="java.util.*"%>
<%@page import="edu.byu.isys413.group1E.handlers.*"%>
<%@page import="edu.byu.isys413.group1E.data.*"%>
<%@page import="java.util.ArrayList.*"%>
<%@page import="java.text.DecimalFormat"%>

<%   
ArrayList<BackupDataBO> bkDataList = (ArrayList<BackupDataBO>)request.getAttribute("bkDataList"); 
ArrayList<String> iconList = (ArrayList<String>)request.getAttribute("iconList");
%>    
    
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
	font-family: tahoma;
}
body {
	background-color: #354153;
}
a{
color:#FFFFFF;
text-decoration:none;
}
.title {background-color: #708BB2; 
color:#FFFFFF; padding:5px; 
font-size:12px; 
font-weight:bold; 
border:1px solid; 
width:492px;
}
.tablething {border-collapse:collapse; color:#FFFFFF; font-size:10px; border-top:0px; border-left:2px solid;
}
-->
</style></head>

<body onload="parent.clear = true;">
<div class="title">
  <table width="100%" border="0" cellspacing="0" cellpadding="3" style="padding:0px;">
    <tr>
      <td width="25"><img src="images/data.gif" width="25" height="23" /></td>
      <td width="156" >MyStuff Digital Storage </td>
 <td width="293"  align="right" ><a href="upload.jsp" style="color:#FFFFFF;">[Upload]</a> | <a href="edu.byu.isys413.actions.calcStorage.action" style="color:#FFFFFF;">[Order  Space]</a></td>
    </tr>
  </table>
</div>
<div style="border-color:#FFFFFF; background-image:url(images/storage.jpg); background-position:center; background-repeat:no-repeat; height:340px; width:504px; overflow:auto; border-left:1px #FFFFFF; " align="right">
  <table width="100%" height="100%" border="1" cellspacing="0" cellpadding="3" bordercolor="#FFFFFF"  class="tablething">
    <!-- THIS IS THE LOOP -->
    <tr>
      <td valign="top"><p align="center">Download your stored files by clicking on the icon or file name. </p>
        <blockquote>
          <div style="height:270px; overflow:auto; border:1px solid; border-color:#666666;">
            <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolor="#666666" style="border-collapse:collapse; border-right:0px; border-color:#666666;">
              <tr>
                <td width="6%">&nbsp;</td>
                <td width="58%"><strong>Filename</strong></td>
                <td width="16%"><strong>Size</strong></td>
                <td width="20%"><strong>Date Uploaded </strong></td>
              </tr>
              <!--LOOP BEGINS -->
              <%for(int x=0;x<bkDataList.size();x++){%>
              
              <tr>
                <td><a href="ShowFile.jsp?guid=<%=bkDataList.get(x).getId()%>"><img border="0px;" src="images/icons/<%=iconList.get(x)%>.gif" /></a></td>
                <td style="text-decoration:underline;"><a href="ShowFile.jsp?guid=<%=bkDataList.get(x).getId()%>"><%=bkDataList.get(x).getFileName()%></a></td>
                <td><%=bkDataList.get(x).getFileSize()%> bytes</td>
                <td align="right"><%=bkDataList.get(x).getDateUploaded()%></td>
                <td width="10"><a href="edu.byu.isys413.actions.deleteFile.action?guid=<%=bkDataList.get(x).getId()%>"><img style="border:0px;" style="border=0px;" src="images/remove.gif" width="12" height="12" /></a></td>
              </tr>
              <%}%>
              <!--LOOP ENDS -->
            </table>
          </div>
        </blockquote></td>
    </tr>
  </table>
</div>
</body>
</html>
